/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-02-18 14:05:59
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\project\bobby\store\diyConditionConfig.js
 * @CIMC-V2
 */
/**
 * @description DIY-条件
 */
const state = () => ({
  modal: false, //弹框
  cacheConditionConfig: [], //临时缓存条件数组
})
const getters = {
  modal: (state) => state.modal,
  getCacheConditionConfig: (state) => state.cacheConditionConfig,
}
const mutations = {
  //交互-弹框开关
  modalSwitch(state) {
    state.modal = !state.modal
  },
  //设置临时缓存条件数组
  setCacheConditionConfig(state, value) {
    state.cacheConditionConfig = value
  },
}
const actions = {
  //获取页面信息
  modalSwitch({ commit }) {
    commit('modalSwitch')
  },
  setCacheConditionConfig({ commit }, value) {
    commit('setCacheConditionConfig', value)
  },
}
export default { state, getters, mutations, actions }
